package common

import (
	"net/http"
	"net/url"
)



type AbuyunProxy struct {
	User string
	AppID string
	AppSecret string
	ProxyServer string

}
var G_abuyun =AbuyunProxy{
	User:"H7HY211X9T4JNLVD",

	AppID:"58510",
	AppSecret:"0A006A58ABD6E144",
	ProxyServer:"http-dyn.abuyun.com:9020",
}
func (p AbuyunProxy)GetProxy()(proxyUrl *url.URL) {
	proxyUrl, _ = url.Parse("http://"+ p.User +":"+ p.AppSecret +"@"+ p.ProxyServer)
	return

}

func (p AbuyunProxy) ProxyClient(tr http.Transport) http.Client {
	proxyUrl, _ := url.Parse("http://"+ p.AppID +":"+ p.AppSecret +"@"+ p.ProxyServer)
	return http.Client{
		Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)},

	}
}




